#include "camprec.h"

#include "CAMCommandPreprocessor.h"


CCAMCommandPreprocessor::CCAMCommandPreprocessor(void):m_pParser(0)
{
	StrID (_T("COMMANDPREPROCESSOR"));
}


CCAMCommandPreprocessor::~CCAMCommandPreprocessor(void)
{
}


void CCAMCommandPreprocessor::ProcessCommand (const wstring &command_line)
{
	Parser ()->Parse (command_line);
}

CCAMParser *CCAMCommandPreprocessor::Parser ()
{
	if (m_pParser == NULL)
		m_pParser = reinterpret_cast<CCAMParser *>(GetObj(_T("MODELLING.PARSER")));

	ASSERT_Obj (m_pParser,_T("CCAMParser *CCAMCommandPreprocessor::Parser ()"));
	return m_pParser;
}
